home *** CD-ROM | disk | FTP | other *** search
- # CVS $Id: getlst.tcl,v 1.4 1995/04/28 15:04:42 zibi Exp $
- # This script tests list communication
- # between wserver and wstcl
- #
- # VtGetString, VtGetList, and VtGet2DList all map to the
- # same wserver function, DoGetList(). That function returns three integers
- # two strings and two string arrays, all at once.
- # The returned tcl result is dependant on the return type
- # of the wstcl command.
- #
-
- VtOpen "test"
-
- echo "Calling VtGetString ..."
- set str [VtGetString]
- echo " <$str>"
-
- echo "\nCalling VtGetList ..."
- set lst [VtGetList]
-
- set row 0
- foreach i $lst {
- echo " list($row) is <$i>"
- incr row 1
- }
-
- echo "\nCalling VtGet2DList ..."
- set lst [VtGet2DList]
-
- set row 0
- foreach i $lst {
- set col 0
- foreach j $i {
- echo "list($row, $col) is <$j>"
- incr col 1
- }
- echo "--------"
- incr row 1
- }
-
- VtClose
-